﻿namespace Reviewer.Entities.MetadataInfo
{
    using System;

    /// <summary>
    /// Image Scale Mode enumeration
    /// </summary>
    public enum ImageScaleMode
    {
        /// <summary>
        /// Doesn't scale
        /// </summary>
        NoScale,
        /// <summary>
        /// //Scales to fit dimensions.
        /// </summary>
        ScaleToFit,
        /// <summary>
        /// Scales propotionally to where the smalles (width or height) is in range 
        /// </summary>
        ScaleProportionalToMinimum,
        /// <summary>
        /// Scales propotionally to where the largest (width or height) is in range 
        /// </summary>
        ScaleProportionalToMaximum,
        /// <summary>
        /// Scales propotionally to where width fits 
        /// </summary>
        ScaleProportionalToWidth,
        /// <summary>
        /// Scales propotionally to where height fits 
        /// </summary>
        ScaleProportionalToHeight
    }

    /// <summary>
    /// Image Crop Mode enumeration
    /// </summary>
    public enum ImageCropMode
    {
        /// <summary>
        /// Doies not crop
        /// </summary>  
        NoCrop,
        /// <summary>
        /// Crops to fit dimensions
        /// </summary>
        CropToDimensions,
        /// <summary>
        /// Crops only with
        /// </summary>
        CropWidth,
        /// <summary>
        /// Crops only height
        /// </summary>
        CropHeight
    }

    /// <summary>
    /// Metadata image property attribute
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
    public sealed class MetadataImagePropertyAttribute : MetadataPropertyBaseAttribute
    {
        /// <summary>
        /// Gets or sets the minimum width.
        /// </summary>
        /// <value>The minimum width.</value>
//        public int MinimumWidth { get; set; }

        /// <summary>
        /// Gets or sets the maximum width.
        /// </summary>
        /// <value>The maximum width.</value>
        public int MaximumWidth { get; set; }

        /// <summary>
        /// Gets or sets the minimum height.
        /// </summary>
        /// <value>The minimum height.</value>
  //      public int MinimumHeight { get; set; }

        /// <summary>
        /// Gets or sets the maximum height.
        /// </summary>
        /// <value>The maximum height.</value>
        public int MaximumHeight { get; set; }

        /// <summary>
        /// Gets or sets the scale mode.
        /// </summary>
        /// <value>The scale mode.</value>
        public ImageScaleMode ScaleMode { get; set; }

        /// <summary>
        /// Gets or sets the crop mode.
        /// </summary>
        /// <value>The crop mode.</value>
        public ImageCropMode CropMode { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [exact size].
        /// </summary>
        /// <value><c>true</c> if [exact size]; otherwise, <c>false</c>.</value>
        public bool ExactSize { get; set; }

        /// <summary>
        /// Gets or sets the path.
        /// </summary>
        /// <value>The path.</value>
        public string Path { get; set; }
    }
}
